<%@page import="com.wframe.framework.util.UploadUtil" %>
<%@page import="com.wframe.project.jnd.rest.util.WebSession" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>
<%
    request.setAttribute("webctx", request.getContextPath() + "/website/");
    request.setAttribute("webname", "巨达药网");
    request.setAttribute("islogin", WebSession.getWbUser(session) == null ? false : true);
    request.setAttribute("isuserauth", WebSession.checkWbUserAuth(session));
    request.setAttribute("fileserver", UploadUtil.getConfig().getDownserver());
    request.setAttribute("cdneserver", UploadUtil.getConfig().getCdnserver());
    response.setHeader("Pragma", "No-cache");
    response.setHeader("Cache-Control", "no-cache");
%>
<%!
    String getRandomFileserver() {
        String fileserver = UploadUtil.getConfig().getDownserver();
        String cdnserver = UploadUtil.getConfig().getCdnserver();
        if (cdnserver != null) {
            String[] fs = cdnserver.split(";");
            String tempFileserver = fs[((int) (Math.random() * 10000000D)) % fs.length];
            if (tempFileserver != null && tempFileserver.trim().length() > 0) {
                return tempFileserver.trim();
            }
        }
        return fileserver;
    }
%>